package Eyjafjalla.card.power;

import Eyjafjalla.action.ChooseHandToCloudAction;
import Eyjafjalla.action.RetainCloudAction;
import Eyjafjalla.action.TranceAction;
import Eyjafjalla.card.AbstractEyjafjallaCard;
import Eyjafjalla.card.status.Cloud_Eyjafjalla;
import Eyjafjalla.modcore.EyjafjallaTag;
import Eyjafjalla.power.ClearDreamPower;
import Eyjafjalla.power.TranceDreamPower;
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.localization.CardStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;

public class TranceDream_Eyjafjalla extends AbstractEyjafjallaCard {
    public static final String ID = "TranceDream_Eyjafjalla";
    private static final CardStrings cardStrings;

    public TranceDream_Eyjafjalla(){
        super(ID, cardStrings.NAME,1,cardStrings.DESCRIPTION,CardType.POWER,CardRarity.UNCOMMON,CardTarget.SELF);
        this.baseMagicNumber = 1;
        this.magicNumber = 1;
        setFireDescription(cardStrings.EXTENDED_DESCRIPTION[0]);
    }

    @Override
    public AbstractCard makeCopy() {
        return new TranceDream_Eyjafjalla();
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {
        addToBot(new ApplyPowerAction(p,p,new TranceDreamPower(p,this.magicNumber),this.magicNumber));
        if(isFire()){
            addToBot(new TranceAction(this.magicNumber));
        }
    }

    @Override
    public void upgrade() {
        if(!this.upgraded){
            upgradeName();
            upgradeMagicNumber(1);
        }
    }


    static {
        cardStrings = CardCrawlGame.languagePack.getCardStrings(ID);
    }
}

